package pers.cyril.study.graphql.demo.entity;

import java.util.List;
import java.util.Objects;

/**
 * 说点什么吧
 *
 * @author Wang Cyril
 * @date 2024/7/2 21:49
 */
public class Province {

    private String code;

    private String name;

    private List<City> cities;

    public Province() {
    }

    public Province(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<City> getCities() {
        return cities;
    }

    public void setCities(List<City> cities) {
        this.cities = cities;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Province province = (Province) o;
        return Objects.equals(code, province.code) && Objects.equals(name, province.name) && Objects.equals(cities, province.cities);
    }

    @Override
    public int hashCode() {
        return Objects.hash(code, name, cities);
    }
}
